<%@page import="java.util.ArrayList,projectodedalo.modelo.*"%>

<!-- // Idea,projectodedalo.clases.PanelEvaluaIdeas -->

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>:: Evaluar Ideas ::</title>
<script type="text/javascript" src="lib/alertify.js"></script>
<link rel="stylesheet" href="themes/alertify.core.css" />
<link rel="stylesheet" href="themes/alertify.default.css" />
<script src="js/jquery-1.3.2.min.js"></script>

<script language="javascript">
	$(document).ready(function() {

		/* 
			Antes de mostrar la ventana modal, recuperar los valores dat-* del link que lo invoca
		 	almacenar cada valor en el control correspondiente de la ventana modal
		 */

		$('#myModal').on('show.bs.modal', function(event) {
			$("#ideaId").val($(event.relatedTarget).data('idea-id'));
			$("#ideaTit").val($(event.relatedTarget).data('idea-tit'));
			$("#ideaDes").val($(event.relatedTarget).data('idea-des'));
		});

	});

	$(window).load(function() {
		$("#menu11").addClass("inactive"); //discutirIdeas.jsp
		$("#menu12").addClass("inactive"); //registrarReuniones.jsp
		$("#menu21").addClass("inactive"); //buscarIdeas.jsp
		$("#menu22").addClass("active"); //evaluarIdeas.jsp
	});
</script>

</head>
<body>
	<jsp:include page="cabecera.jsp" flush="true" />
	<div class="container"> <!-- Frame gris general -->
		<form class="form-horizontal well" method="post" action="ApruebaIdeaServlet">
			<div class="alert alert-info alert-coupon" align="center"
				style="font-weight: bold;">.:. EVALUAR IDEAS .:.</div>
			<div class="panel panel-default"> <!-- Frame Blanco  -->
				<div class="panel-body"> <!-- Frame Blanco interior...mostrar data -->	
					<div class="panel panel-default"> 	<!-- Frame delimita la info del boton regresar -->			 					 
					<table class="table table-condensed table-striped table-bordered table-hover no-margin">
						<%
							Idea vo = (Idea) request.getAttribute("vo");
						%>
						<div class="row"> <!-- Mostrar Titulos -->
							<div class="col-md-4">
								<h4>ID</h4>
							</div>
							<div class="col-md-4">
								<h4>T&iacute;tulo</h4>
							</div>
							<div class="col-md-4">
								<h4>Descripci&oacute;n</h4>
							</div>
						</div>
						<div class="row">  <!-- Mostrar Datos -->
							<div class="col-md-4">
								<input type="text" id="idIdea" name="idIdea"
									value="<%=vo.getIdIdea()%>" />
							</div>
							<div class="col-md-4">
								<input type="text" id="ideaTit" name="ideaTit"
									value="<%=vo.getTituloIdea()%>" />
							</div>
							<div class="col-md-4">
								<textarea class="form-control" id="ideaDes" name="ideaDes"
									value=""><%=vo.getDescripcionIdea()%></textarea>
							</div>							
						</div>
					</table>	
						<br>
							<label class="control-label" for="idAsesor">Asesor :</label> 
							<select name="idAsesor" id="idAsesor">
						<%
								ArrayList<Usuario> asesores = (ArrayList<Usuario>) request.getAttribute("l_asesores");
									if (asesores != null) {
										for (Usuario dd2 : asesores) {
						%>
								<option value= <%=dd2.getIdUsuario() %> > <%=dd2.getNombreCompleto()%> </option>
						<%
										}
									}
						%>
							</select>
						<br>
						<br>
						    <input type="radio" name="accion" id="Devolver" value="CREADA">
        					<label for="Rechazar">Devolver</label>
       						<input type="radio" name="accion" id="Aprobar" value="APROBADA" checked="checked">
        					<label for="Aprobar" >Aprobar</label>
        					<input type="radio" name="accion" id="Rechazar" value="RECHAZADA" >
        					<label for="Aprobar" >Rechazar</label>
					
					</div>						
					<input type="submit" value="Actualizar" /> 
					<input type="button" value="Regresar" onclick="window.location='buscarIdeas.jsp' " />						
				</div>
					<%
						String msg_aprobado = (String) request.getAttribute("MSG_APROBADO");
						if (msg_aprobado != null) {
							out.println("<p >" + msg_aprobado + "</p>");
						}
					%>
			</div>
						
			<footer>
			<p>&copy; Dedalo 2014.</p>
			</footer>
			<!-- fin de div-panel -->
		</form>
	</div>

</body>
</html>